import ReactDOM from 'react-dom/client';
import "@arco-design/web-react/dist/css/arco.css";
import { createBrowserRouter, RouterProvider, useNavigate } from "react-router-dom";
import { routes } from './router';
import './index.css'
import store from "./store";
import { Provider } from 'react-redux';

import IMSDK from './sdk/index'



IMSDK.callback_onIMLog = (log: any) => {
  // console.log("Im log ：" + log)
}



// IMSDK.callback_onIMAfterLoginSucess = (data: any) => {
//   console.log("IM login success: " + JSON.stringify(data));
// }




const router = createBrowserRouter(routes);


ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
).render(
  <Provider store={store}>
    <RouterProvider router={router} />
  </Provider>
);



